﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using Lamex.Library;
using Lamex.Interface;
using Lamex.Library.CommonClass;

namespace Lamex.mTools.UI
{
    public partial class frmTL_Main : frmModuleBase
    {
        public frmTL_Main()
        {
            InitializeComponent();
            menuStrip1.Text = ModuleNames.mTools; //与AssemblyModuleEntry.ModuleName定义相同
        }
        public override MenuStrip GetModuleMenu()
        {
            return this.menuStrip1;
        }

        private void menuTL_QC_BatchPrint_Click(object sender, EventArgs e)
        {
            //嵌入式
            //不带参
            //\\tx-fs10\TX-FS1\IMA
            string strExePath = @"\\tx-fs10\TX-FS1\IMA\MES\System\SourceCode\BatchPrinting\WindowsFormsApplication2\bin\Debug\BatchPrinting.exe";
            MdiTools.OpenChildWebBrowse(this.MdiParent as IMdiForm, new frmExeForm(strExePath, "批量打印"), sender as ToolStripMenuItem);

        }

        private void menuTL_PDFSeparate_Click(object sender, EventArgs e)
        {
            //frmTL_PDFSeparate frm = new frmTL_PDFSeparate();
            //frm.MdiParent = this;
            //frm.Show();
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmTL_PDFSeparate), sender as ToolStripMenuItem);
        }

        private void menuTL_PDF2JPG_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmTL_PdfToJpg), sender as ToolStripMenuItem);
        }

        private void menuTL_CombineExcelFiles_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmTL_MergerExecelFile), sender as ToolStripMenuItem);
        }

        private void menuTL_Image_Batch_Import_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmTL_Image_Batch_Process), sender as ToolStripMenuItem);
        }

        private void menuTL_Image_Cropping_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmTL_Images_Cropping), sender as ToolStripMenuItem);
        }

        private void menuTL_Image_Brower_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmTL_Image_Brower), sender as ToolStripMenuItem);
        }

        private void menuTL_Search_Engineer_Drawing_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmTL_Image_Brower), sender as ToolStripMenuItem);
        }

        private void menuTL_Search_Accessory_Image_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmTL_Image_Accessories), sender as ToolStripMenuItem);
        }

        private void menuTL_AutoCAD_Drawing_Browser_Click(object sender, EventArgs e)
        {
            //string strExePath = @"C:\Program Files\Autodesk\AutoCAD 2019\acad.exe";
            //MdiTools.OpenChildWebBrowse(this.MdiParent as IMdiForm, new frmExeForm(strExePath, "CAD图查看"), sender as ToolStripMenuItem);
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmTL_Engineering_Drawing_Browser), sender as ToolStripMenuItem);
        }

        private void menuTL_Creo_Drawing_Browser_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmTL_Engineering_Drawing_Browser), sender as ToolStripMenuItem);
        }

        private void menuTL_Search_Product_Image_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmTL_Image_Accessories), sender as ToolStripMenuItem);
        }

        private void menuTL_FSO_Batch_Rename_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmTL_FSO_File_Operation), sender as ToolStripMenuItem);
        }
    }
}